package com.jiacl.controller;

import com.jiacl.entity.JiaclFamilySeniority;
import com.jiacl.entity.core.Result;
import com.jiacl.service.FamilySeniorityService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * Created by XiaoWei on 2017/9/2.
 */
@Controller
@ResponseBody
@RequestMapping("/familySeniority")
public class FamilySeniorityController {
    @Autowired
    private FamilySeniorityService familySeniorityService;

    @PostMapping("/addFamilySeniority")
    public ResponseEntity<Result> addFamilySeniority(JiaclFamilySeniority jiaclFamilySeniority) throws Exception{
        Result result = familySeniorityService.addFamilySeniorityServiceByArea(jiaclFamilySeniority);
        return ResponseEntity.ok(result);
    }
}
